-
Notifications
You must be signed in to change notification settings - Fork 32
Avoid copy file when building libsass #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Simplifies build
Build passing https://ci.appveyor.com/project/am11/libsass-net/build/1.0.162 @darrenkopp, should we configure AppVeryor CI with GitHub pull request so the build status is visible? |
<Target Name="AfterBuild"> | ||
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass32.dll" DestinationFolder="$(TargetDir)" /> | ||
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass64.dll" DestinationFolder="$(TargetDir)" /> | ||
<Copy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I've since hit with this one is DLL in use stuff, so it might be work setting the SkipUnchangedFiles="true"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree; however, most time is consumed on force compilation of LibSass project twice in LibSass.Net.csproj, since we are compiling everytime regardless of C/C++ source changes. The real difference at (solution level or even a single dependent project level) build time would be made when we use Rebuild
instead of Build
target there in MSBuild task which builds libsass. We cannot do that right now as Rebuild
whips out the previous build artifacts (x64 rebuild will delete x86 build artifacts, regardless the TargetFile for x64 has different name..).
Another reason not to compile for many platforms at once.
Going forward, build for every architecture at single compile-time is neither feasible to build nor to test (x86, x64 and in future ARM, ARM64 etc. and then OS Linux-glibc, Linux-musl-libc, Mac, Windows etc. in future..) We would need to build one platform at a time (#47). Fixing #47 is next thing on my todo, after this PR is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think probably in Debug it should only compile the current achitecture, and leave the full matrix for the Release. Separate stuff though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate stuff
I have added SkipUnchangedFiles
with 16b8f1c.
The problem may still persist as SkipUnchangedFiles
checks for modified timestamp
to detect the change, which in this case the DLL always gets build and modified so we might not get the desired effect unless we start building for one platform. Hence <MSBuild target="Rebuild"
will ultimately fix this problem. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, this only helps when your doing a Project Build instead of a Solution build. Thanks for fixing it though!
Simplifies build